package com.towexin.application.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.towexin.application.system.domain.SystemLog;
import com.towexin.application.system.mapper.SystemLogMapper;
import com.towexin.application.system.service.SystemLogService;
import org.springframework.stereotype.Service;

/**
 * TODO
 *
 * @author Towexin
 * @version 1.0
 * @date 2021/4/18 10:07
 */
@Service
public class SystemLogServiceImpl extends ServiceImpl<SystemLogMapper, SystemLog> implements SystemLogService {
	// 分页获取日志列表
	@Override
	public IPage<SystemLog> selectAndPage(int page, int limit) {
		return page(new Page(page, limit), new QueryWrapper<SystemLog>().orderByDesc("created_time"));
	}
}
